import Vue from 'vue'
import Router from 'vue-router'
import HomeApp from "./views/HomeApp";
// eslint-disable-next-line no-unused-vars
import LoginIn from './pages/LoginIn'
// eslint-disable-next-line no-unused-vars
import SignUp from './pages/SignUp'
// eslint-disable-next-line no-unused-vars
import Info from './pages/Info'
// eslint-disable-next-line no-unused-vars
import Upload from './pages/Upload'
// eslint-disable-next-line no-unused-vars
import Live from './pages/Live'
// eslint-disable-next-line no-unused-vars
import Mine from './pages/Mine'
// eslint-disable-next-line no-unused-vars
import Setting from './pages/Setting'
// eslint-disable-next-line no-unused-vars
import Search from './pages/Search'
// eslint-disable-next-line no-unused-vars
import SingerList from './pages/SingerList'
// eslint-disable-next-line no-unused-vars
import SongList from './pages/SongList'
// eslint-disable-next-line no-unu
// sed-vars
import Lyric from './pages/Lyric'
import record from "./components/record";
// eslint-disable-next-line no-unused-vars
// 点击某一歌单和歌手跳转的页面
import SingerAlbum from './pages/SingerAlbum'
// eslint-disable-next-line no-unused-vars
import SongListAlbum from './pages/SongListAlbum'
// eslint-disable-next-line no-unused-vars
import Error from './pages/404'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      name: 'home',
      component: HomeApp,
      meta: {
        title: '首页',
        active: '/home'
      }
    },
    {
      path: '/404',
      component: Error,
      meta: {
        title: '404',
        active: '/home'
      }
    },
    {
      path: '*',
      redirect: '/404',
    },
    {
      path: '/mine',
      name: 'mine',
      component: Mine,
      meta: {
        title: '我的',
        active: '/mine'
      }
    },
    {
      path: '/login-in',
      name: 'login-in',
      component: LoginIn,
      meta: {
        title: '密码登录',
        active: '/mine'
      }
    },
    {
      path: '/sign-up',
      name: 'sign-up',
      component: SignUp,
      meta: {
        title: '注册',
        active: '/mine'
      }
    },
    {
      path: '/info',
      name: 'info',
      component: Info,
      meta: {
        title: '编辑个人资料',
        active: '/mine'
      }
    },
    {
      path: '/upload',
      name: 'upload',
      component: Upload,
      meta: {
        title: '修改个人头像',
        active: '/mine'
      }
    },
    {
      path: '/live',
      name: 'live',
      component: Live,
      meta: {
        title: '现场',
        active: '/live'
      }
    },
    {
      path: '/search',
      name: 'search',
      component: Search,
      meta: {
        title: '搜索',
        active: '/home',
        bottomPlayBar: 'true'
      }
    },
    {
      path: '/setting',
      name: 'setting',
      component: Setting,
      meta: {
        title: '设置',
        active: '/home'
      }
    },
    {
      path: '/singer-list',
      name: 'singer-list',
      component: SingerList,
      meta: {
        title: '歌手',
        active: '/home',
        bottomPlayBar: 'true'
      }
    },
    {
      path: '/song-list',
      name: 'song-list',
      component: SongList,
      meta: {
        title: '歌单',
        active: '/home',
        bottomPlayBar: 'true'
      }
    },
    {
      path: '/lyric',
      name: 'lyric',
      component: Lyric,
      meta: {
        title: '歌词',
        active: '/mine'
      }
    },
    {
      path: '/singer-album/:id',
      name: 'singer-album',
      component: SingerAlbum,
      meta: {
        title: '歌手内容',
        active: '/home'
      }
    },
    {
      path: '/song-list-album/:id',
      name: 'song-list-album',
      component: SongListAlbum,
      meta: {
        title: '歌单内容',
        active: '/home'
      }
    },
  ]
})
